home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2007 March
/
PCWorld_2007-03_cd.bin
/
komunikace
/
acehtml
/
acehtmlfreeware.exe
/
scriptdef
/
Days Old.sd
< prev
next >
Wrap
INI File
|
2006-09-13
|
1KB
|
56 lines
[SUBJECT]
Description=Calculate the number of days since a given date
ImageIndex=-1
Folder=Mathematics
[BODY_TEXT]
;<script language="JavaScript">
;<!-- Begin
;var montharray=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
;function countup(yr,m,d) {
;var today=new Date();
;var todayy=today.getYear();
;
;if ((navigator.appName == "Microsoft Internet Explorer") && (todayy < 2000))
;todayy="19" + todayy;
;if (navigator.appName == "Netscape")
;todayy=1900 + todayy;
;
;var todaym=today.getMonth();
;var todayd=today.getDate();
;var todaystring=montharray[todaym]+" "+todayd+", "+todayy;
;var paststring=montharray[m-1]+" "+d+", "+yr;
;var difference=(Math.round((Date.parse(todaystring)-Date.parse(paststring))/(24*60*60*1000))*1);
;
;document.write("`Message_Before`" + difference + "`Message_After`");
;
;}
;countup(`Year`,`Month`,`Day`); // Date in format: (year,month,day)
;// End -->
;</script>
;
[`Year`]
Kind=S
Value=2000
[`Month`]
Kind=S
Value=03
[`Day`]
Kind=S
Value=10
[`Message_Before`]
Kind=S
Value=It was created
[`Message_After`]
Kind=S
Value= days ago.